Profile revising method

ABSTRACT

When a profile (A) has been defined, a part program in accordance with the definition is stored in advance. When a figure element (C 1 ) constituting the profile has been revised to be another figure element (C 1  &#39;) figure elements (straight lines S 1  and S 2 ) defined utilizing the figure element (circular arc C 1 ) are also changed to reflect the results of the revision in order to be converted into other figure elements (straight lines S 1  &#39; and S 2  &#39;), thereby revising the profile to a profile (B).

BACKGROUND OF THE INVENTION

This invention relates to a method of revising a profile, and more particularly, to a profile revising method for revising a profile generated by joining, in order, figure elements specified by figure definition statements in an automatic programming language.

In an automatic programming system for creating numerical control (NC) data using an automatic programming language such as APT (automatic programming tools) or FAPT.

A part program based on the automatic programming language is created by defining points, straight lines and circular arcs using simple symbols (this is referred to as "figure definition"), and then defining a tool path using the defined points, straight lines and circular arcs (referred to as "motion statement definition"). The part program based on the automatic programming language is subsequently converted into NC data comprising NC data (EIA codes or ISO codes) in a format capable of being executed by an NC unit.

For example, in the creation of a part program for moving a tool along a part profile A comprising straight lines and a circular arcs shown in FIG. 6(a), figure definition is performed by defining a point P₁, straight lines S₁, S₂ and S₃ and a circle Cl (see FIG. 6(b)), which are necessary for defining a part profile, as follows using a keyboard or tablet:

    C.sub.1 =x.sub.3, y.sub.3, r.sub.1                         ( 1)

    P.sub.1 =x.sub.1, y.sub.1                                  ( 2)

    P.sub.2 =x.sub.2, y.sub.2                                  ( 3)

    S.sub.1 =P.sub.1,C.sub.1, L                                (4)

    S.sub.2 =P.sub.2, C.sub.1, R                               (5)

    S.sub.3 =P.sub.1, P.sub.2                                  ( 6)

Thereafter, the figure elements (which are displayed on a CRT screen) are picked in order, e.g.,

    S.sub.1 →C.sub.1 →S.sub.2 →S.sub.3

to define the profile A, (FIG. 6(a)), after which machining starting and end points, etc., of the part profile A are designated by a motion statement definition to define a tool path along which a tool is moved.

In the foregoing,

(1) signifies a circle of center (x₃,y₃) and radius r₁ ;

(6) signifies a straight line passing through points P₁, P₂ ;

(4) signifies a left-side tangent line (straight line) of two tangent lines passing through point P₁ and contacting the circle C₁ ; and

(5) signifies a right-side tangent line (straight line) of two tangent lines passing through point P₂ and contacting the circle C₁. The character L is a qualifier meaning "left", and the character R is a qualifier meaning "right". There are two methods of figure definition. A first method entails defining points, straight lines and circles using absolute numeric data. A point is defined as

    P=x, y

using the coordinates (x,y) of the point (see FIG. 7(a), a straight line is defined as

    S=P.sub.1, P.sub.2 or S=x.sub.1, y.sub.1, x.sub.2, y.sub.2 using two points (x.sub.1,y.sub.1), (x.sub.2,y.sub.2) through which the straight line passes (see FIG. 7(b)), and a circle is defined as

    C=x, y, r

using the coordinates (x,y) of the center of the circle and the radius r of the circle (see FIG. 7(c)).

The second method entails defining points, straight lines and circles using other elements (points, straight lines and circles) that have already been defined. For example, point P₁ is defined as follows with reference to FIG. 7(d):

    P.sub.1 =S, C, L

straight line S₁ is defined as follows with reference to FIG. 7(e):

    S.sub.1 =C.sub.1, C.sub.2, A

(the upper straight line tangent to two circles C₁ and C₂, where A is the qualifier meaning "upper"), and circle C is defined as follows with reference to FIG. 7(f):

    C=S.sub.1, S.sub.2, S.sub.3

(a circle tangent to three straight lines). The foregoing method in which elements already defined are used to define other elements is only one example, there being many other methods of definition available.

When figure definition is performed in the prior art, the arrangement is such that a figure is defined by a first definition statement or, alternatively, an already defined figure is used to define another figure by a second definition statement. A figure defined by a second definition statement is re-expressed internally by the first definition statement, which uses coordinate data. Therefore, the second definition statement is erased. Consequently, in a case where it is desired to modify the part profile, as shown in FIG. 8, by changing the radius of the circular arc C₁ of the profile A (see FIG. 6(a)), the figure is defined by the following part program:

    C.sub.1 =x.sub.3, y.sub.3, r.sub.1

    P.sub.1 =x.sub.1, y.sub.1

    P.sub.2 =x.sub.2, y.sub.2

    S.sub.1 =P.sub.1, C.sub.1, L

    S.sub.2 =P.sub.2, C.sub.1, R

    S.sub.3 =P.sub.1, P.sub.2

    S.sub.1

    C.sub.1

    S.sub.2

    S.sub.3

    PEND

The prior art is such that the profile must be specified by redefining each figure element from the beginning and picking the figure elements in order along the profile. As a result, revising the already defined profile is a troublesome task.

Accordingly, an object of the present invention is to provide a profile revising method through which a profile can be revised merely by solely modifying the figure definition statement of a figure element relating to a modification.

SUMMARY OF THE INVENTION

When a profile has been defined, a figure definition statement (part program) in accordance with the definition is stored in advance. When a predetermined figure element constituting the profile has been revised, the figure definition statement of the revised figure element in the part program is revised. A new profile is generated based on the new part program resulting from the revision. In this way another figure element defined by utilizing the revised figure element is made to reflect the revised result to revise the profile into another profile.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an apparatus which can employ the present invention;

FIG. 2 is a portion describing the menu chart;

FIG. 3 is a flowchart of processing according to the present invention;

FIGS. 4(a) through 5 are diagrams describing an embodiment of the present invention; and

FIG. 6(a) through 8 are diagrams describing an example of the prior art.

DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 is a block diagram of an apparatus for practicing the method of the present invention.

Numeral 101 denotes a ROM for storing a loading program and the like. Numeral 102 is a processor for executing automatic programming processing, and 103 is a RAM for storing a system program read in from a floppy FL, as well as for storing various parameters and processing results. Numeral 104 denotes an NC data memory for storing the finally created NC data having an executable format, 105 is a keyboard, 106 is a display unit (CRT), 107 is a disc controller, and 108 is a tablet device having a tablet surface 108a to which a menu chart 108b having menu items is affixed. Prescribed menu items are picked by a tablet cursor 108c. A graphic cursor GCS on a display screen is moved by moving the cursor 108a on the tablet surface. FL represents a floppy disc.

The CRT 106 displays a profile A (the dashed line) which prevails prior to a revision, the profile being composed of straight lines S₁, S₂ and S₃ and a circular arc C₁. The CRT 106 also displays a profile B which prevails after a revision, this profile being composed of straight lies S₁ ', S₂ ', and S₃ and a circular arc C₁ '.

FIG. 2 is a diagram for describing the principal parts of the menu chart 108b. Numeral 1 is a "POINT/POINT GROUP DEFINITION" section, 2 is a "STRAIGHT LINE DEFINITION" section, 3 is a "CIRCLE DEFINITION" section, 4 is a "SPECIAL SHAPE DEFINITION" section and 5 is a "SHAPE DEFINITION" section. The "SHAPE DEFINITION" section 5 includes a "SHAPE MODIFICATION" item 5a.

The profile revising method of the present invention will now be described in accordance with the flowchart of FIG. 3 and the diagrams of FIGS. 4 and 5 for describing the processing. It should be noted that the system program for creating the NC part program, parameters and the like have already been stored in the RAM 103 from the floppy disc FL.

The figure elements which are the straight lines S₁, S₂, S₃ and the circular arc C₁ shown in FIG. 4(a) are defined by directly entering coordinates using the tablet 108 and keyboard 105 (figure definition by the first definition statement) or by citing already defined figure elements displayed on the CRT 106 (figure definition by the second definition statement). As described above with regard to the prior art in relation to FIG. 6, a part program is created by figure definition and profile definition in the following manner:

    ______________________________________                                         C.sub.1 = x.sub.3, y.sub.3, r.sub.1                                            P.sub.1 = x.sub.1, y.sub.1                                                     P.sub.2 = x.sub.2, y.sub.2                                                     S.sub.1 = P.sub.1, C.sub.1, L                                                  S.sub.2 = P.sub.2, C.sub.1, R                                                  S.sub.3 = P.sub.1, P.sub.2                                                                   . . .  (The above is the figure                                                       definition portion.)                                      S.sub.1                                                                        C.sub.1                                                                        S.sub.2                                                                        S.sub.3                                                                                      . . .  (The above is the                                                              profile definition                                                             portion.)                                                 PEND          . . .  (This represents program                                                       end.)                                                     ______________________________________                                    

In accordance with the present invention, the part program defined above is stored in the RAM 103 without being erased. The entirety of the second definition statement of the part program is re-expressed by the first definition statement and is similarly stored in the RAM 103. A profile is generated based on the part program of the first definition statement, and the profile is displayed on the CRT (step 201).

If the "SHAPE MODIFICATION" item 5a is picked from the tablet menu 108b under these conditions, the processor 102 causes the CRT 106 to display the prompt "SELECT ELEMENT TO BE MODIFIED" (step 202).

If the graphic cursor a is positioned on the circular arc C₁, which is the element to be modified, and this element is picked, the processor 102 causes the color of circular arc Cl to change to another color and causes the CRT 106 to display the prompt "DESIGNATE ELEMENT TO BE SUBSTITUTED".

In order to define the "element to be substituted", the operator picks the "CIRCLE DEFINITION" item 3a from the tablet menu 108b and then inputs the coordinates (x₃ ', y₃ ') of the center of the circle as well as the radius r₃ ' of the circle, whereupon the processor 102 causes the CRT 106 to display a circle C₁ ' specified by the input data (step 204; see FIG. 4(b)).

Thereafter, the "element to be substituted" is designated by picking the circle C₁ ' using the graphic cursor a, whereupon the processor 102 converts the circle definition statement

    C.sub.1 =x.sub.3, y.sub.3, r.sub.3

in the abovementioned part program into the following definition statement (step 205):

    C.sub.1 =x.sub.3 ', y.sub.3 ', r.sub.3 '

Next, the processor 102 generates the profile, following its modification, by the new part program and displays it on the CRT 106 (see step 4(c); step 206). In this case, the straight lines S₁, and S₂, defined as being tangent to the circle C₁ before its modification, are modified into straight lines S.sub., and S₂ ' tangent to the circle C_(l) ' after its modification. In a case where the definition is to the effect that the straight lines S₁, and S₂ are "tangent to circle C₁ " has not been made, that is, a case where the figure definition statement is not one in which the straight lines S₁, and S₂ utilize the circle C₁, the straight lines S₁, and S₂ do not change even if circle C₁ is modified, as shown in FIG. 5.

In accordance with the present invention, the arrangement is such that when a figure element defined by a first figure definition statement is modified, a figure element of a second definition statement utilizing the above mentioned figure element also is revised, and the new profile is generated. Accordingly, a profile can be revised in a simple manner merely by solely modifying the first figure definition statement, without requiring that the profile be defined anew from the beginning. 

We claim:
 1. A method of revising a profile generated by joining, in a designated order, figure elements specified by a first figure definition statement which defines a point by coordinates of the point, a straight line specified by coordinates of two points, and a circle specified by coordinates of a center of the circle and the radius thereof, and a second definition statement which defines a point, a straight line and a circular arc by using figure elements already defined, said method comprising the steps of:a) storing, as defined, a part program which includes the first and second figure definition statements for defining each figure element in the designated order; b) revising a predetermined figure element forming a profile defined by one of the first and second figure definition statements; c) revising a figure element defined by the other one of the first and second figure definition statements utilizing the revised figure element in the part program; and d) generating a new profile based on the new part program after the revision.
 2. A method of revising a profile according to claim 1, further comprising the steps of:e) displaying a profile on a display screen prior to the revision; and f) displaying a specified figure element to be revised in a manner distinguishable from other figure elements.
 3. A method of revising a profile according to claim 1, further comprising the steps of:e) displaying a new figure element on a display screen when anew figure element to be substituted for a figure element to be revised is defined by a first definition statement; and f) substituting a definition statement of the revised figure element in the part program by a definition statement of the new figure element in response to a substitution instruction. 